package com.ckf.ckfmall.user.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ckf.ckfmall.api.entity.UserAddress;
import com.ckf.ckfmall.api.service.UserService;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;

/**
 * 供应者实现类
 *
 * @author 安详的苦丁茶
 * @Service:注意是阿里巴巴的dubbo注解，用于暴露服务
 * @Component :相当于spring中 @Service，为避免名字和dubbo的@Service一样名字
 * @date 2020/6/5 8:15
 */

@Service
@Component
public class UserServiceImpl implements UserService {
    @Override
    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("UserServiceImpl..3.....");
        UserAddress address1 = new UserAddress(1, "北京市昌平区宏福科技园综合楼3层", "1", "李老师", "010-56253825", "Y");
        UserAddress address2 = new UserAddress(2, "深圳市宝安区西部硅谷大厦B座3层（深圳分校）", "1", "王老师", "010-56253825", "N");

        return Arrays.asList(address1, address2);
    }
}
